package org.dentalcard.entity;

import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;

import javax.persistence.*;
import java.util.Date;

/**
 * @user: Vladimir Chernishov
 * @date: 25.02.12
 * @time: 19:41
 */
@Entity
@Table(name = "visit")
public class Visit {
    @Id
    @Temporal(TemporalType.TIMESTAMP)
    private Date time;

    @Temporal(TemporalType.DATE)
    private Date workDayDay;

    private Integer workDayUserId;

    @ManyToOne
    @Fetch(FetchMode.JOIN)
    private Patient patient;
    
    @Column(name = "description", length = 255)
    private String description;
    

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Patient getPatient() {
        return patient;
    }

    public void setPatient(Patient patient) {
        this.patient = patient;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getWorkDayDay() {
        return workDayDay;
    }

    public void setWorkDayDay(Date workDayDay) {
        this.workDayDay = workDayDay;
    }

    public Integer getWorkDayUserId() {
        return workDayUserId;
    }

    public void setWorkDayUserId(Integer workDayUserId) {
        this.workDayUserId = workDayUserId;
    }
}
